Fluent Assertions Documentation
FluentAssertions Assembly / FluentAssertions.Primitives Namespace / ObjectAssertions<TSubject,TAssertions> Class / BeEquivalentTo Method / BeEquivalentTo<TExpectation>(TExpectation,String,Object[]) Method
The expected element.
A formatted phrase as is supported by System.String.Format(System.String,System.Object[]) explaining why the assertion is needed. If the phrase does not start with the word because, it is prepended automatically.
Zero or more objects to format using the placeholders in because.
In This Topic
    BeEquivalentTo<TExpectation>(TExpectation,String,Object[]) Method
    In This Topic
    Asserts that an object is equivalent to another object.
    Syntax

    Parameters

    expectation
    The expected element.
    because
    A formatted phrase as is supported by System.String.Format(System.String,System.Object[]) explaining why the assertion is needed. If the phrase does not start with the word because, it is prepended automatically.
    becauseArgs
    Zero or more objects to format using the placeholders in because.

    Type Parameters

    TExpectation
    Exceptions
    ExceptionDescription
    because
    Permissions
    PermissionDescription
    because
    Remarks
    Objects are equivalent when both object graphs have equally named properties with the same value, irrespective of the type of those objects. Two properties are also equal if one type can be converted to another and the result is equal. The type of a collection property is ignored as long as the collection implements IEnumerable and all items in the collection are structurally equal. Notice that actual behavior is determined by the global defaults managed by FluentAssertions.AssertionConfiguration.
    Example
    because
    Supported Frameworks
    because
    See Also